package com.gofaraway.web.controller;

import com.gofaraway.common.domin.Response;
import com.gofaraway.service.enumfacade.EnumContext;
import com.gofaraway.service.facade.request.EnumQueryRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ChenPeng
 * @Date 2024/4/12 15:15
 */
@RestController
@RequestMapping("/enum")
public class EnumSearchController {


    @Autowired
    private EnumContext enumContext;

    @RequestMapping("/search")
    public Response<Object> search(@RequestBody EnumQueryRequest request) {
        return enumContext.executeStrategy(request);
    }
}
